package com.example.adminservice.dto;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.example.adminservice.enums.AuditStatus;
import com.example.commom.comment.BooleanValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 *  书籍审核实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "书籍审核实体类", description = "书籍审核实体类")
public class BookAuditDto {

    @ApiModelProperty("书籍ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @NotNull(message = "书籍id不能为空")
    private Long bookId;

    @ApiModelProperty("审核结果")
    @NotNull(message = "审核结果不能为空")
    @BooleanValue(message = "审核结果请传入 true(1) or false(0)")
    private Boolean status;

    @ApiModelProperty("审核意见")
    @NotBlank(message = "审核意见不能为空")
    private String notes;
}
